package com.cl.ks.entity;


import com.cl.ks.annotation.GenerateMVC;
import com.cl.mvc.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.ArrayList;
import java.util.List;

@Entity
@Table(name="spark_node_category")
@org.hibernate.annotations.Table(appliesTo = "spark_node_category", comment = "流程图节点分类表")
@Getter
@Setter
@ToString
@RequiredArgsConstructor
@GenerateMVC
public class SparkNodeCategory extends BaseEntity {

    @ApiModelProperty("节点分类名称")
    private String categoryName;
    @OneToMany(mappedBy = "sparkNodeCategory")
    @JsonIgnoreProperties({"sparkNodeCategory"})
    @ApiModelProperty("节点列表")
    @ToString.Exclude
    private List<SparkNode> sparkNodeList = new ArrayList<>();
}
